<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>RoR Admin &#183; GFN InSight documentation</title>
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le styles -->
    <link href="bootstrap.min.css" rel="stylesheet">
    <link href="style.css" rel="stylesheet">
    <style type="text/css">
      /* Override some defaults */
      html, body {
        background-color: #eee;
      }
      body {
        padding-top: 40px; /* 40px to make the container go all the way to the bottom of the topbar */
      }
      .container > footer p {
        text-align: center; /* center align it with the container */
      }
      .container {
        width: 820px; /* downsize our container to make the content feel a bit tighter and more cohesive. NOTE: this removes two full columns from the grid, meaning you only go to 14 columns and not 16. */
      }

      /* The white background content wrapper */
      .container > .content {
        background-color: #fff;
        padding: 20px;
        margin: 0 -20px; /* negative indent the amount of the padding to maintain the grid system */
        -webkit-border-radius: 0 0 6px 6px;
           -moz-border-radius: 0 0 6px 6px;
                border-radius: 0 0 6px 6px;
        -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
           -moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
                box-shadow: 0 1px 2px rgba(0,0,0,.15);
      }

      /* Page header tweaks */
      .page-header {
        background-color: #f5f5f5;
        padding: 20px 20px 10px;
        margin: -20px -20px 20px;
      }

      /* Styles you shouldn't keep as they are for displaying this base example only */
      .content .span10,
      .content .span4 {
        min-height: 500px;
      }
      /* Give a quick and non-cross-browser friendly divider */
      .content .span4 {
        margin-left: 0;
        padding-left: 19px;
        border-left: 1px solid #eee;
      }

      .topbar .btn {
        border: 0;
      }

    </style>

    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="images/favicon.ico">
    <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
  </head>

  <body>

<div class="topbar">
      <div class="fill">
        <div class="container">
          <a class="brand" href="http://stormy-stone-6022.heroku.com">GFN InSight</a>
          <ul class="nav">
	    <li><a href="index.html">Home</a></li>
            <li><a href="datastore.html">MongoDB datastore</a></li>
            <li><a href="flashapp.html">Flash app</a></li>
            <li class="active"><a href="#">RoR Admin</a></li>
          </ul>
        </div>
      </div>
    </div>


    <div class="container">

      <div class="content">
        <div class="page-header">
          <h1>RoR Admin <small>(Partially-built) Administrative interface for manipulating data</small></h1>
        </div>
        <div class="row">
          <div class="span10">
            <h2>Overview</h2>
            The Ruby on Rails Admin is a simple MVC based Ruby on Rails application that is aimed to serve the purpose of a simple administrative interface for the datastore.
            It is meant to offer common functionality of <strong>C</strong>reate, <strong>R</strong>ead, <strong>U</strong>pdate and <strong>D</strong>elete (CRUD) on the existing models in the database, without requiring to perform data manipulation operations in isolation, and then re-initialization.<p/>
            In future, it is aimed to help accomplish the following tasks:
            <ul>
            	<li>Creation of new "templated" collections for new countries</li>
            	<li>Generating reports and visualizations from the data for the GFN team</li>
            	<li>Running calculations and statistical operations (previously run on MS Excel), thus eliminating the need for the spreadsheets altogether</li>
            	<li>Sophisticated distribution and collaboration features including permission management on tasks</li>
            </ul>
            All the data that may be edited using the interface feeds directly into any public applications, including but not limited to <a href="flashapp.html">the Flash application</a>. 
			<p/><div class="alert-message warning">This RoR administration interface is the core web application that is hosted on the Heroku platform. It's <code>public</code> directory hosts <a href="flashapp.html">the Flash application</a></div>
			<h2>Application configurations</h2>
			This application resembles almost any other minimal scaffold RoR application with two major points of contrast:
			<ol>
				<li><strong>Ever growing models</strong>: Unlike traditional applications, this administration interface does not have a limited fixed number of models. The number of models keeps growing as we add new countries (for every country 5 new models are added, see <a href="datastore.html">MongoDB datastore</a> to learn why)</li>
				<li><strong>noSQL database connection</strong>: Rather than a traditional SQL database solution, this application uses a set of drivers known as <a href="http://mongomapper.com/" target="_blank">MongoMapper</a> in order to be able to connect to a MongoDB database</li>
			</ol>
			<h2>Modifying the application</h2>
            In order to modify the current RoR Admin application, you will need to obtain the source code of for the project,
            and then install the necessary tools on your development machine to run the program.
            <h3>Obtaining the source</h3>
            The latest version of the source code, as worked on by the team, is available in the <span class="label notice no-transform">Git</span> repository of the Google Code project:<p/>
            <a href="http://code.google.com/p/is475-gfnsters/" target="_blank">http://code.google.com/p/is475-gfnsters/</a><p/>
            This code can be clone publicly using the following command from terminal:
            <p/><code>git clone https://code.google.com/p/is475-gfnsters/</code>
			<p/>or using a GUI Git client such as <a href="http://code.google.com/p/tortoisegit/" target="_blank">Tortoise Git</a>.
          	<h2>External Documentation</h2>
          	<ul>
          		<li><a href="http://mongomapper.com/" target="_blank">MongoMapper</a></li>
          		<li><a href="http://rubyonrails.org/" target="_blank">Ruby on Rails</a></li>
          		<li><a href="http://www.mongodb.org/display/DOCS/Rails+3+-+Getting+Started" target="_blank">MongoDB: Rails 3 - Getting Started</a></li>
          		<li><a href="http://railstips.org/blog/archives/2009/06/27/mongomapper-the-rad-mongo-wrapper/" target="_blank">Tutorial on configuring RoR app for MongoDB</a></li>
				<li><a href="https://github.com/banker/mongodb-rails3-sample" target="_blank">MongoDB, Rails 3 sample application</a></li>
				<li><a href="http://asciicasts.com/episodes/194-mongodb-and-mongomapper" target="_blank">Another good tutorial on using MongoMapper</a></li>
				<li><a href="http://stackoverflow.com/questions/6495314/no-value-provided-for-required-options-orm-rails-3" target="_blank">Dealing with the no ORM error</a></li>	          
          	</ul>
          </div>
          <div class="span4">
          	<h3>Current status</h3>
          	The application is currently a very rudimentary state of what is described. It is only capable to read, update and delete data on the 5 collections on China, that are current present in <a href="datastore.html">the datastore</a>. It is also not the least visually appealing or very usable.
          	<h3>Open Challenges</h3>
          	The unique ID of each record has been replaced with the object ID generated by MongoDB. This is not an ideal state when manipulating resulting records in this application.
          	<h3>Software versions</h3>
          	Here is the list of the current software/driver versions in use, with no conclusions or suggestions on which versions work better than the others:
          	<ul>
          		<li>Ruby: 1.8.7 (1.9.2+ recommended)</li>
          		<li>Rails: 3.1.1</li>
          		<li>MongoMapper: 0.9.2</li>
          	</ul>
            <h3>Additional notes</h3>
		In order to access this data collection store, you need to be an owner/collaborator of the project stormy-stone-6022 on Heroku. If you are not the current owner, kindly discuss this with the administrator of this application, Kyle Gracey.
          </div>
        </div>
      </div>

      <footer>
        <p>&copy; Team GFN InSight &#183; Department of Information Systems, Carnegie Mellon University</p>
      </footer>

    </div> <!-- /container -->

  </body>
</html>
